<?php
/**
 *
 * 기본 컨텐츠 컨트롤러
 * @author gudals
 *
 */


class contController extends commController
{
    // cop top layout
    protected $sTopLayout = '/layout/top.html';
    // cop footer layout
    protected $sFooterLayout = '/layout/footer.html';

    function __construct($params = array())
    {
        parent::__construct($params);

        // 로그인 여부 확인
        //$this->checkLogin();
    }

    public function auth()
    {
        // 로그인 여부 확인
        //$this->checkLogin();
    }
    
    public function isLogin()
    {
        if (!commSession::session_is_registered('sId')) return false;
        else return true;
    }

    /**
     *
     * 로그인 여부 체크
     */
    private function checkLogin()
    {
        if (!commSession::session_is_registered('sId')) {
            utilMust::locationReplace('/?m=logout');
            exit;
        }
        
        /*
        if (commSession::session_is_registered('sType') && commSession::session_get_data('sType') == 'admin') {
            
            if (!commSession::session_is_registered('sId')) {
                //commSession::session_destroy();
                utilMust::locationReplace('/?m=logout&type=222');
                exit;

            } else {
                return true;
            }

        } else {
            //commSession::session_destroy();
            utilMust::locationReplace('/?m=logout&type=111');
            exit;
        }
        */
    }
}